class Post
  include Mongoid::Document

  def_field :title, type: String, desc: '标题'
  def_field :content, type: String, desc: '内容'

  belongs_to :user; desc :user, '所属者'

  validates :user, presence: true
end
